{extend name="public:layout" /}
{block name="title"}添加{$moudleName}{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index',['mid'=>$Request.param.mid,'cid'=>$Request.param.cid])}">{$moudleName}列表</a>
                </li>
                <li class="active">添加{$moudleName}</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">

				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">车费</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="车费" name="spend_money" value="{$info['spend_money']}" datatype="*" />
					</div>
					
					<label class="col-sm-2 control-label Validform_label">结算方式</label>
                    <div class="col-sm-3" style="padding-left: 30px;">
                        <label class="radio-inline i-checks" style="margin-right: 40px;">
                        <input type='radio' name="dri_status" value="0" /> 现金
                        </label>
                        <label class="radio-inline i-checks">
                            <input type='radio' name="dri_status" value="1" /> 转账
                        </label>
                    </div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">定金</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="定金" name="spend_money" value="{$info['spend_money']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">服务费</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="服务费" name="spend_money" value="{$info['spend_money']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">现收</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="现收" name="order_pay" value="{$info['order_pay']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">转账</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="转账" name="spend_money" value="{$info['spend_money']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">过路费</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="过路费" name="order_tolls" value="{$info['order_tolls']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">停车费</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="停车费" name="order_stop" value="{$info['order_stop']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">待收</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="待收" name="order_q" value="{$info['order_q']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">加油费</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="加油费" name="order_fuel" value="{$info['order_fuel']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">升数</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="升数" name="order_l" value="{$info['order_l']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">食宿</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="食宿" name="order_eat" value="{$info['order_eat']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">其他</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="其他" name="order_other" value="{$info['order_other']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">结余</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="结余" name="order_bala" value="{$info['order_bala']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">始发里程</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="始发里程" name="order_start_mm" value="{$info['order_start_mm']}" datatype="*" />
					</div>
					<label class="col-sm-2 control-label Validform_label">结束里程</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="结束里程" name="order_end_mm" value="{$info['order_end_mm']}" datatype="*" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label Validform_label">行驶里程</label>
					<div class="col-sm-3">
					    <input class="form-control" type="text" placeholder="行驶里程" name="order_mileage" value="{$info['order_mileage']}" datatype="*" />
					</div>
				</div>



                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" id="btnSub" type="button">保存</button>
                        <a href="{:url('index',['mid'=>$Request.param.mid])}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    });
    
    setTpl();
        In('icheck',function () {
            iCheck();
            $("input[name='cat_type']").on('ifChecked', function(event){
                setTpl();
            });
            $("input[name='is_batch']").on('ifChanged', function (event) {
                if($(this).prop('checked')){
                    $('.two').show();
                    $('.one').hide();
                }else{
                    $('.two').hide();
                    $('.one').show();
                }
            });
        })
    })
    function setTpl() {
        var catTpl = $('input[name="cat_type"]:checked ').data('tpl');
        $("input[name='cat_tpl']").val(catTpl);
    }
</script>
{/block}